//
//  CabDriverMapVC.m
//  sunna-iphone-customer
//
//  Created by David Hamrick on 4/12/10.
//  Copyright 2010 Hamrick Software. All rights reserved.
//

#import "CabDriverMapVC.h"
#import "CabAnnotation.h"

@implementation CabDriverMapVC

@synthesize cabDriver;

- (void)viewDidLoad
{
	//NSLog(@"MapView = %@",mapView);
	MKCoordinateRegion region;
	region.span.latitudeDelta = 0.005;
	region.span.longitudeDelta = 0.005;
	//-86.8045
	region.center.latitude = 36.1435;
	region.center.longitude = -86.8045;	
	[mapView setRegion:region];
	
	CabAnnotation* annot = [[[CabAnnotation alloc] init] autorelease];
	CLLocationCoordinate2D coord;
	coord.latitude = [[cabDriver latitude] floatValue];
	coord.latitude = [[cabDriver longitude] floatValue];
	annot.coordinate = region.center;
	[mapView addAnnotation:annot];
}

- (void)didReceiveMemoryWarning {
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}


- (void)dealloc {
    [super dealloc];
}


@end
